import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
// const path = require('path');  //不支持
import { resolve } from 'path'

export default defineConfig({
  plugins: [vue()],
  define: {
    'process.env': {},
  },
  resolve: {
    // 配置路径别名
    alias: {
      '@': resolve(__dirname, './src'),
    },
  },
  //设置代理
  server: {
    proxy: {
      '/api': 'http://testapi.xuexiluxian.cn'
    }
  }
});